home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
cstdio.arc
/
SRC.ARC
/
SETBUF.C
< prev
next >
Wrap
C/C++ Source or Header
|
1984-07-28
|
428b
|
21 lines
/* setbuf.c - assign buffering to a stream.
(C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved.
G. R. Mansfield. 84/07/28.
Ver 1.0-4728.
*/
#include <defstd.h>
#include <stdio.h>
setbuf(fp, buf) /* buffered binary input */
BYTE *buf;
FILE *fp;
{
if (fp->_flag & (_READ | _WRITE)) { /* file is open */
if (buf == NULL)
fp->_flag |= _UNBUF;
else
fp->_ptr = fp->_base = buf;
}
}